Networking of controllers, sensors and actuators with the help of a communication system, a bus system, has increased drastically in recent years in the construction of modern motor vehicles and in machine construction, in particular in the machine tool sector and in automation. Synergistic effects due to the distribution of functions among a plurality of control units may also be achieved in this way. These are known as distributed systems. Communication between different stations is increasingly being accomplished via a bus or bus system. Communication traffic on the bus system, access and reception mechanisms as well as error processing are regulated according to a protocol.
The CAN (controller area network) protocol has become established in the automotive sector. This is an event-controlled protocol, i.e., protocol activities such as sending a message are initiated by events originating outside the communication system. Definite access to the communication system, i.e., bus system, is achieved by priority-based bit arbitration. This requires that each message be assigned a definite priority. The CAN protocol is very flexible, so it is readily possible to add additional nodes and messages as long as there are still free priorities (message identifiers). The collection of all messages to be sent in the network together with their priorities and sender nodes as well as possible reception nodes are stored in a list known as the communication matrix.
An alternative approach to spontaneous, event-controlled communication is the strictly time-controlled approach. All communication activities on the bus are strictly periodic. Protocol activities such as sending a message are triggered only by the passing of time, which is valid for the entire bus system. Access to the medium is based on the allocation of time ranges in which one sender has exclusive sending right. The protocol is comparatively inflexible; new nodes may be added only if the corresponding time intervals have been freed up in advance. This circumstance requires that the order of messages be determined even before starting operation. Thus, a schedule is compiled which must meet the requirements of the messages with respect to repeat rate, redundancy, deadlines, etc. This is known as a bus schedule. Positioning of the messages within the transmission periods must be coordinated with the applications produced by the message contents to minimize the latencies between application time and transmission time. If this coordination does not take place, the advantage of time-controlled transmission (minimum latency jitter in sending the message on the bus) is lost. High demands are thus made of the scheduling tools.
German Published Patent Application No. 100 00 302, German Published Patent Application No. 100 00 303, German Published Patent Application No. 100 00 304 and German Published Patent Application No. 100 00 305 describe approaches to time-controlled CAN, namely TTCAN (time triggered controller area network) which complies with the requirements outlined above with regard to time-controlled communication as well as the demand for a certain measure of flexibility. TTCAN meets this by establishing a communication cycle (basic cycle) in exclusive time windows for periodic messages of certain communication stations and in arbitrating time windows for spontaneous messages of a plurality of communication stations.
In addition, a TTCAN network as a bus system is assumed, but this is not to be understood as restrictive with regard to the subsequent object of the present invention. Instead, the object of the present invention, which is to be explained below, may also be used with other comparable bus systems.
In doing so, a uniform clock pulse must be derived from the various internal local clock pulses of the users, in particular the control units, for the communication network, i.e., the bus system in networked control units in automation, in motor vehicles and in other areas of use, for example, or the individual starting clocks of the users must be synchronized to such a uniform common network clock, e.g., the network time unit NTU for TTCAN.
The usual method of forming a local clock adapted to the reference clock and/or the system clock from a reference clock and in particular a faster system clock is based on counting how many system clock periods are in a certain number of reference clock periods, known as the measurement period. The numerical value then indicates how many system clock periods form the local clock to be adapted. The measurement period is usually constant and limited to values of 2n reference clock periods (nεN0). This adjustment or synchronization is performed by defining a scaling factor which is linked to the local clock to generate a synchronized local clock. To do so, multiplication and division must be implemented to determine the new scaling factor. In particular in the case of a hardware implementation, multiplication and division are very complex to handle.
Therefore, the goal of the present invention is to provide a general method, a device and a corresponding bus system by which synchronization of a user, i.e., adjustment of a local clock and/or a local clock period of such a user, may be performed easily without the length of the measurement period having to remain constant or being limited to certain values.